-
Notifications
You must be signed in to change notification settings - Fork 95
Add config apply request queue #949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aphralG
approved these changes
Jan 8, 2025
aphralG
approved these changes
Jan 15, 2025
sean-breen
approved these changes
Jan 15, 2025
sean-breen
pushed a commit
that referenced
this pull request
Jan 15, 2025
sean-breen
added a commit
that referenced
this pull request
Jan 28, 2025
* support reading token from file via config * remove empty file * simplify token validation and add unit tests * add unit tests for transport credentials funtions * address PR feedback * proto updates * fix function name * fix lint error: lll * add missing PR feedback * remove error log message * fix unit test * Fix apk test package naming (#961) * modify alpine package name: nginx-agent-3.0.0_1234 -> nginx-agent-3.0.0.1234 * protoc-gen update * Update agent config defaults and format (#959) * update config defaults and format * Add config apply request queue (#949) * add unit tests for transport credentials funtions * fix test name * fix error message * fix lint error: lll * modify error messages * remove error logging and modify messages * fall back to token field if error occurs when reading file * fix bad merge * restarting gRPC conn * remove code from testing * fix lint errors: whitespace, revive * use tokenpath as config option, fixes problem with cli param parsing * correct yaml key in AuthConfig * proto updates --------- Co-authored-by: aphralG <[email protected]> Co-authored-by: Donal Hurley <[email protected]>
sean-breen
added a commit
that referenced
this pull request
Mar 3, 2025
* support reading token from file via config * remove empty file * simplify token validation and add unit tests * add unit tests for transport credentials funtions * address PR feedback * proto updates * fix function name * fix lint error: lll * add missing PR feedback * remove error log message * fix unit test * Fix apk test package naming (#961) * modify alpine package name: nginx-agent-3.0.0_1234 -> nginx-agent-3.0.0.1234 * protoc-gen update * Update agent config defaults and format (#959) * update config defaults and format * Add config apply request queue (#949) * add unit tests for transport credentials funtions * fix test name * fix error message * fix lint error: lll * modify error messages * remove error logging and modify messages * fall back to token field if error occurs when reading file * fix bad merge * restarting gRPC conn * remove code from testing * fix lint errors: whitespace, revive * add new topic for handling Token file updates * add CredentialWatcherService * adding initial watcher for credential files * trigger connection reset after credential update * added ConnectionResetTopic and event processing * Automatically add token-path to Credential watcher * add function to check credential paths defined in agent config * fix lint * use tokenpath as config option, fixes problem with cli param parsing * add CredentialWatcherService + tests * fix lint errors * updates to generated files * Send create connection after disconnect from management plane (#967) * correct yaml key in AuthConfig * fix: flaky test (#968) `TestConvertToStructs` was occasionally failing because it was expecting `range` over a `map` to be a consistent order, but per [spec]: > The iteration order over maps is not specified and is not guaranteed to be the same from one iteration to the next. Uses `ElementsMatch` so the test passes even when the order of elements is different. [spec]: https://go.dev/ref/spec#RangeClause * update tests * update tests * wait for create connection * PR feedback * fix race condition * clean up * clean up * update grpc connection in command and file plugins * move log message and fix file_plugin_test.go * fix lint * handle command and file service client updates after grpc reset * update FakeCommandService * add unit tests * fix bad test * formatting * remove test * increase timeout before checking connection after restart * set isConnected to false when handling subscribe errors * increase code coverage * lint fix * fieldalignment * remove unused fake * PR feedback * update fake command service * more PR feedback * PR feedback: disable watcher during config apply * don't pause credential watcher during config apply * debug log messages * Add mutex around updating client in the CommandService * undo change to metric name * update test * lock watcher when replacing grpc connection * add lock around subscibe client access * fix lint error * unlock watcher mutex in error case * return with no blank line * lint error ? * handle rename cases * remove unneccessary cases from switch * rewrite switch as if * handling kubernetes secret update case * fix test * save connection status when resetting file manager service --------- Co-authored-by: aphralG <[email protected]> Co-authored-by: Donal Hurley <[email protected]> Co-authored-by: Ryan Davis <[email protected]> Co-authored-by: Aphral Griffin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
If more than one config apply requests are sent to the agent at once the agent will only apply the changes in the latest config apply request.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)